#include "BasicObjFac.h"


BasicObjFac::BasicObjFac( Ogre::SceneManager* smgr, btDynamicsWorld* world ):m_SceneMgr(smgr), m_World(world)
{
}

BasicObjFac::~BasicObjFac(void)
{
}

//create obj by name
EntityWrapper* BasicObjFac::CreateMeshSH( String name, String meshName, float mass, Vector3 pos, Vector3 scale, Quaternion quat, long qury /*= 0x0*/)
{
	EntityWrapper* newEW = new EntityWrapper(name, meshName, m_World, m_SceneMgr, EntityWrapper::SHAPE_MESH, mass, pos, scale, quat, qury);
	return newEW;
}

EntityWrapper* BasicObjFac::CreateCube(String name, String meshName, float mass, Vector3 pos, Vector3 scale, Quaternion quat, long qury /*= 0x0*/)
{
	EntityWrapper* newEW = new EntityWrapper(name, meshName, m_World, m_SceneMgr, EntityWrapper::SHAPE_CUBE, mass, pos, scale, quat, qury);
	return newEW;
}

EntityWrapper* BasicObjFac::CreateSphere( String name, String meshName, float mass, Vector3 pos, Vector3 scale, Quaternion quat, long qury /*= 0x0*/ )
{
	EntityWrapper* newEW = new EntityWrapper(name, meshName, m_World, m_SceneMgr, EntityWrapper::SHAPE_SPHERE, mass, pos, scale, quat, qury);
	return newEW;
}


//create obj by node
EntityWrapper* BasicObjFac::CreateMeshSH( Ogre::SceneNode* node, Ogre::Entity* ent, float mass, long qury /*= 0x0*/ )
{
	EntityWrapper* newEW = new EntityWrapper(node, ent, m_World, m_SceneMgr, EntityWrapper::SHAPE_MESH, mass, qury);
	return newEW;
}

EntityWrapper* BasicObjFac::CreateCube( Ogre::SceneNode* node, Ogre::Entity* ent, float mass, long qury /*= 0x0*/ )
{
	EntityWrapper* newEW = new EntityWrapper(node, ent, m_World, m_SceneMgr, EntityWrapper::SHAPE_CUBE, mass, qury);
	return newEW;
}

EntityWrapper* BasicObjFac::CreateSphere( Ogre::SceneNode* node, Ogre::Entity* ent, float mass, long qury /*= 0x0*/ )
{
	EntityWrapper* newEW = new EntityWrapper(node, ent, m_World, m_SceneMgr, EntityWrapper::SHAPE_SPHERE, mass, qury);
	return newEW;
}